package com.zy.chapter8

/**
 * @author: zhaoyi
 * @create: 2020-08-02 18:13
 * @description: 测试父类
 **/
class Person(val name: String) extends AbsUser {

  var age: Int = _

  def getAge: Int = age

  //重写父类抽象方法  override 可加也可不加
  def getId: Int = name.hashCode

  //override def getId: Int = name.hashCode
  override val address: String = s"$name home "
}
